package com.blog.service.frontpage;

import java.util.List;

import com.blog.dao.frontpage.AdminArticleDao;
import com.blog.dao.frontpage.PersoncenterDao;
import com.blog.entity.AdminArticleCountEntity;
import com.blog.entity.AdminArticleEntity;
import com.blog.entity.AdminArticleQueryEntity;

public class AdminArticleService {
	private static AdminArticleService instance;
	private AdminArticleService() {
		
	}
	public static synchronized AdminArticleService getInstance() {
		if(instance==null) {
			instance=new AdminArticleService();
		}
		return instance;
	}
	AdminArticleDao dao=AdminArticleDao.getInstance();
	
	/**
	 * 1.获取最新的文章
	 */
	public List<AdminArticleEntity> getNewAdminArticle(AdminArticleQueryEntity e){
		return dao.getNewAdminArticle(e);
	}
	/**
	 * 2.根据状态查询文章数目
	 */
	public AdminArticleCountEntity getTotalRecord(AdminArticleQueryEntity e) {
		return dao.getTotalRecord(e);
	}
}
